package user

import (
	"github.com/gogf/gf/v2/frame/g"
	"server/internal/model"
)

type LoginReq struct {
	g.Meta   `path:"/user/login" tags:"v1-用户" method:"post" summary:"登录" description:"用户账号密码登录"`
	Phone    string `v:"required" dc:"手机号"`
	Password string `v:"required" dc:"密码-md5值"`
}
type LoginRes struct {
	Token string `json:"token" dc:""`
}

type LogoutReq struct {
	g.Meta `path:"/user/logout" tags:"v1-用户" method:"post" summary:"退出" description:"退出"`
}
type LogoutRes struct {
	Result int `json:"result" dc:"用户退出结果"`
}

type RegisterReq struct {
	g.Meta   `path:"/user/register" tags:"v1-用户" method:"post" summary:"注册" description:"注册"`
	Phone    string `v:"required" dc:"手机号"`
	Name     string `v:"required" dc:"姓名"`
	Password string `v:"required" dc:"密码-md5值"`
}
type RegisterRes struct {
	ID int64 `json:"id" dc:"用户ID"`
}

type DetailReq struct {
	g.Meta `path:"/user/detail" tags:"v1-用户" method:"get" summary:"详情" description:"详情"`
}
type DetailRes struct {
	Data model.LessonUserDetail `json:"data"`
}
